package de.home.spring.backend.dao.rowmappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.simple.ParameterizedRowMapper;

import de.home.spring.beans.Person;

public class PersonRowMapper implements ParameterizedRowMapper<Person> {

	public Person mapRow(ResultSet rs, int arg1) throws SQLException {
		Person p = new Person();
		
		p.setAge(rs.getInt("age"));
		p.setName(rs.getString("name"));
		
		return p;
	}

}
